<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>Commande préparée : Pépinière des Avettes</title>
</head>

<body>
	<div style="margin:0 auto 50px auto;width:700px;background:#D3CFD1;">
		<img src="<?php E($GENERAL_WWW_ROOT) ?>css/images/bg-mail-top.png" alt="">
   	<table width="680" style="margin:10px;" border="0" cellspacing="0" cellpadding="0">
         <tr>
            <td width="680" style="text-align:left;padding:15px 5px 15px 5px;background:#fff;font-family:Arial;" valign="middle">
					<!-- INFOS #1 -->
					<table style="font-family:Verdana,Arial,sans-serif;font-size:12px;margin:2px;text-transform:uppercase;">
						<tr>
							<td style="color:#000;width:240px;">
							<strong style="color:#E30180">Livraison</strong><br><br>
							<?php E(FormFieldAddress::getAsHTML($DATAS['BILL']['F_OVERLOADED_SHIPPING_ADDRESS'],true)) ?>
							</td>
							<td style="width:220px;">
							<strong style="color:#E30180">Facturation</strong><br><br>
							<?php E(FormFieldAddress::getAsHTML($DATAS['BILL']['F_OVERLOADED_BILLING_ADDRESS'],true)) ?>
							</td>
							<td style="">
								<table style="width:200px;font-family:Verdana,Arial,sans-serif;color:#000;">
									<tr><td><strong style="font-size:14px;color:#E30180">Total TTC</strong></td><td style="text-align:right;font-size:19px;color:#E30180"><?php E(PRICE(TTC($DATAS['BILL']['F_HT'],$DATAS['BILL']['F_SHIPPING_COST'],$DATAS['BILL']['F_TAX_PERCENTAGE']))) ?></td></tr>
									<tr><td><strong style="font-size:10px;color:#E30180">TVA</strong></td><td style="text-align:right;font-size:12px;color:#E30180"><?php E(PRICE(TVA($DATAS['BILL']['F_HT'],$DATAS['BILL']['F_SHIPPING_COST'],$DATAS['BILL']['F_TAX_PERCENTAGE']))) ?></td></tr>
									<tr><td><strong style="font-size:10px;color:#E30180">Frais livraison</strong></td><td style="text-align:right;font-size:12px;color:#E30180"><?php E(PRICE($DATAS['BILL']['F_SHIPPING_COST'])) ?></td></tr>
								</table>
							</td>
						</tr>
					</table>
					<!-- INFOS #2 -->
					<table cellspacing="0" cellpadding="0" class="b-commande" style="width:650px;margin:10px;">
						<thead>
						<tr><td style="font-size:10px;background-color:#E30180;color:#fff;">Article</td><td style="font-size:10px;background-color:#E30180;color:#fff;text-align:center;">Quantité</td><td style="font-size:10px;text-align:right;background-color:#E30180;color:#fff;">Total</td></tr>
						</thead>
						<tbody>
						<?php
						foreach($DATAS['PRODUCTS'] as $id => $prod):
						$q = $prod['F_QUANTITY'];
						$t = $prod['TYPE'];
						$p = PRICE($q*$prod['F_SELL_PRICE']);
						if(!eregi('point',$t))
							{
							if(eregi('miel',$t))
								{
								$txt = "{$prod['F_NAME']} ({$prod['F_WEIGHT']})" ;
								$t = str_replace('miel_','',$t);
				 				P("<tr><td>{$txt}</td><td style=\"text-align:center;\">{$q}</td><td style=\"text-align:right\">{$p}</td></tr>");
								}
							else
								{
								$txt = "{$prod['F_GENRE']} {$prod['F_ESPECE']}" ;
				 				P("<tr><td>{$txt}</td><td style=\"text-align:center;\">{$q}</td><td style=\"text-align:right\">{$p}</td></tr>");
								}
							}
						endforeach;
						?>
						</tbody>
					</table>
					<!-- INFOS #3 -->
					<span style="font-family:Verdana,Arial,sans-serif;font-size:10px;color:#000;text-align:center;margin:0;margin:10px;display:block;">
						copyright &copy; 2009 La Pépinière des Avettes - Reproduction et diffusion interdite - <a href="<?php E($GENERAL_WWW_ROOT) ?>" style="color:#000;"><?php E($GENERAL_WWW_ROOT) ?></a><br>
						<!--<small>Code <?php E($DATAS['ORDER_ID']) ?> - <?php E(Bills::$m_a_pstyles[$DATAS['BILL']['F_PAYMENT_STYLE']]) ?> - <?php E($DATAS['BILL']['F_TRANSACTION']) ?></small>-->
			  		</span>
            </td>
         </tr>
		</table>
	</div>
</body>
</html>